Conventionally, character recognition techniques of identifying characters contained in input images have been put into practice. For example, a PC can convert an image captured by a scanner into text data by using a character recognition process. When a large number of documents are to be scanned in a copying machine using an ADF, the orientation of each document is determined by using this technique, and a copy can be printed out upon correction of the orientation.
In performing a character recognition process, it is important to convert an input multilevel image into an image suitable for character recognition before the process. In this case, an image suitable for character recognition is a binary image obtained by extracting only characters from the information contained in an input image while maintaining their sizes, layout, thicknesses, fonts, and the like (i.e., information other than character portions is deleted), and expressing a background portion in white and character portions in black. A binarization method of obtaining such a binary image is disclosed in, for example, Japanese Patent Laid-Open Nos. 08-223409 and 09-305754.
According to the conventional binarization method, if a reversed character is contained in an input image, a binary image is output without changing the reversed character. As a consequence, the reversed character image portion may not be recognized as a character and hence not be regarded as a target for character recognition. It is very difficult to determine whether or not an image after binarization is a reversed character. If, therefore, a reversed character is contained in a given image, the character recognition precision deteriorates.
Along with increasing color document images owing to improvements in the throughput of computers, increases in memory capacity, advances in scanners, and the like, there have appeared more images which have low contrast between background colors and character colors and more images which contain both images other than characters, e.g., photos, and characters. As a consequence, in some cases, it is impossible to obtain a binary image suitable for character recognition by only binarization threshold adjustment or block size adjustment. When, for example, a single binarization threshold is set for the entire surface of an image, an image unsusceptible to small image unevenness can be generally obtained. In the case of a color image having a plurality of character colors and character portion background colors, however, a deterioration in image quality occurs. Performing binarization while adaptively determining a threshold for each small block can cope with changes in character portion background color for each processing block. On the other hand, when the same processing block contains both a character area and another kind of area such as a photo area, the resultant image tends to include noise. In addition, as the block size is decreased to prevent each processing block from containing a plurality of areas, the influence of noise in each block increases. This rather increases density unevenness and tends to produce noise.
As described above, no conventional binarization methods could output any binary image which could realize high character recognition precision in the case of an image containing reversed characters, an image having relatively low contrast between a background color and a character color, e.g., a color image, or and an image containing both a character portion and an image portion other than characters, such as a photo portion.